<?php
namespace app\admin\controller;
use app\common\lib\Util;
class Image
{
    public function index()
    {
       $file = request()->file('file');
       $info=$file->move('../public/static/upload');
        if($info) {
            $data = [
                'image' => 'http://47.99.146.126:8811'."/upload/".$info->getSaveName(),
            ];
            return Util::show(1, 'OK', $data);
        }else {
            return Util::show(-1, 'error');
        }
    }

}
